Safety constraints for a control algorithm based drug delivery system

ABSTRACT

Disclosed are a system, methods and computer-readable medium products that provide safety constraints for an insulin-delivery management program. Various examples provide safety constraints for a control algorithm-based drug delivery system that provides automatic delivery of a drug based on sensor input. Glucose measurement values may be received at regular time intervals from a sensor. A processor may predict future glucose values based on prior glucose measurement values. The safety constraints assist in safe operation of the drug delivery system during various operational scenarios. In some examples, predicted future glucose values may be used to implement safety constraints that mitigate under-delivery or over-delivery of the drug while not overly burdening the user of the drug delivery system and without sacrificing performance of the drug delivery system. Other safety constraints are also disclosed.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Patent ApplicationNo. 62/667,118, filed on May 4, 2018, the entire contents of which arehereby incorporated by reference.

TECHNICAL FIELD

The described examples provide safety constraints for a drug deliverysystem that provides automatic delivery of a drug based on sensor inputto ensure that users do not over or under deliver medication providedautomatically based on the control algorithm.

BACKGROUND

Medication delivery systems typically delivery a medication to a userbased on health conditions of the user. For example, a controlalgorithm-based drug delivery systems can monitor a user's glucoselevels, determine an appropriate level of medication, such as insulin,for the user based on the monitored medical conditions, such as glucoselevels, and subsequently dispense the medication to the user. Thecontrol algorithms used in control algorithm-based drug delivery systemsand other medication delivery systems generally rely on data provided byusers and/or expected glucose and medication levels determined bydifferent means, such as insulin deliveries and the provided user data.However, the provided data or expected levels may be incorrect orerroneous, which may lead to incorrect medication dosages and incorrectmedication delivery schedules. Data and measurement errors may resultdue to many different reasons, such as user confusion (e.g., haveincorrect time, input incorrect numbers, or the like), glucose sensordrift or bias (which may be due to many different factors related to theglucose sensor), errors in the medication delivery system, or the like.As a result, conventional medication delivery systems do not providesafety constraints that enable automated medication delivery systems torespond to incorrect data and measurement errors. A need thereforeexists for a medication delivery system, such as an insulin managementsystem, that includes such features as safety constraints, alerts andremedial actions.

SUMMARY

Disclosed is a non-transitory computer readable medium embodied withprogramming code executable by a processor. The processor when executingthe programming code is operable to perform functions, includingfunctions to receive at regular time intervals a value of a glucosemeasurement via a wireless connection with a glucose monitor. Theglucose measurement is performed by the glucose monitor. Future glucosevalues may be predicted based on prior glucose measurement values. Aninsulin basal delivery rate may be adjusted to be provided by a medicaldevice based on the predicted future glucose values. Insulin may bedelivered via the medical device according to the adjusted insulin basaldelivery rate.

Disclosed is a method performed by a processor coupled to a glucosemonitor via a wireless connection. The method includes receiving, by theprocessor from the glucose monitor, a number of glucose measurementvalues. Each glucose measurement value of the number of glucosemeasurement values is received at a regular time interval over a periodof time and the regular time interval is less than the period of time. Anumber of future glucose measurement values may be predicted using atleast one of the number of received glucose measurement values. It maybe determined that a subsequent glucose measurement value has not beenreceived within a next regular time interval. In response to thedetermination that the subsequent glucose measurement value has notarrived, a total daily insulin-based basal delivery rate may be adjustedto be provided by a medical device based on at least one of thepredicted number of future glucose measurement values. Insulin may bedelivered via the medical device according to the adjusted total dailyinsulin-based basal delivery rate.

Disclosed is another method in which a processor coupled to a medicaldevice determines that the medical device has delivered more than apreset volume of insulin over a set amount of time. The preset volume ofinsulin is based on one or more of: a user input basal rate, a ratecalculated by an artificial pancreas algorithm using an average dailydelivery rate, a rate based on user weight and/or user age, a totaldaily insulin delivered, or a total daily basal delivered. In responseto the determination, an amount of insulin to be delivered by themedical device as an adjusted basal dosage is adjusted based on acalculation using a volume of insulin delivered over the set amount oftime and a total daily insulin to be delivered as calculated by anartificial pancreas algorithm.

Disclosed is a system that includes a medical device, a sensor and amanagement device. The medical device includes a pump, a reservoirconfigured to contain insulin, a processor and a transceiver, and themedical device is operable to deliver insulin in response to outputsfrom the processor. The sensor may include a transmitter, a processorand a cannula. The sensor is operable to measure blood glucose andoutput a blood glucose value. The management device may include aprocessor, a memory configured to store an artificial pancreas algorithmand a transceiver. The artificial pancreas algorithm is operable todetermine times and dosages of insulin to be delivered to a user, thetimes and dosages may be calculated based on a user's sex, a user's age,a user's weight, a user's height, and/or on glucose levels provided bythe sensor. The processor of the management device upon execution of theartificial pancreas algorithm is operable to determine an occurrence ofa hypoglycemic event. In response to the determination of the occurrenceof the hypoglycemic event, a glucose rate of change filter may beimplemented for a predetermined period of time. The rate of changefilter limits a rate of change in measured blood glucose values used bythe artificial pancreas algorithm in the determination of a time fordelivery of insulin and a dosage of the insulin being delivered. Theprocessor instructs the medical device deliver the determined dosage ofthe insulin at the determined time for delivery.

Disclosed is yet another method including determining, by a processor ofa medical management device in response to receipt of a glucosemeasurement value from a sensor, that a medical device has beendelivering insulin below a fixed personalized basal rate for a period oftime of insulin delivery history. A result of delivering insulin below afixed personalized basal rate is a negative insulin on board value. Theprocessor may determine that the negative insulin on board value isgreater than three times a user's total daily insulin-based hourly basalvalue. In response to the negative insulin on board value being greaterthan a multiple of a user's total daily insulin-based hourly basalvalue, delivery of insulin by the medical device may be altered todeliver a total daily-based basal or a personalized volume of insulin. Anotification message may be output requesting the user to acknowledgethe altered delivery of insulin or a requirement for a new calibrationvalue for use by the processor in calculating a calibrated amount ofinsulin for delivery.

Disclosed is another example of a non-transitory computer readablemedium embodied with programming code executable by a processor. Theprocessor when executing the programming code is operable to performfunctions, including functions to obtain a series of glucoseconcentration values as measured at regular time intervals by a glucosemonitor. The processor may detect a rapid rate of increase in a glucoseconcentration. In reaction to the detection of the rapid rate ofincrease in the glucose concentration, the processor may implement aresponse to the rapid rate of increase in the glucose concentration.

An example of another method is disclosed in which a processor coupledto a glucose sensor determines insulin delivery is not attenuating at arate suitable to recover from a hypoglycemic event. In response to thedetermination, a likelihood of suspension of insulin may be increasingby either: reducing a penalty of estimated outcomes within an artificialpancreas algorithm such that a requested insulin delivery is below auser-inputted basal delivery or scaling deviations of insulin deliverythat are below the user-inputted basal delivery to be proportional tothe user-inputted basal delivery.

A further example of a method is disclosed in which a processor coupledto a glucose sensor determines during exercise or other activity thatmay induce increased hypoglycemic risk that insulin delivery is notattenuating at rate suitable to maintain glucose concentrations. Inresponse to the determination, either the control target glucose valuemay be increasing to a glucose value higher than the current targetglucose value or the input basal delivery may be reduced to an inputbasal value lower than a current input basal value.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of a drug delivery system operable toimplement the techniques and processes described herein.

FIG. 2 illustrates an example of the fixed rate of insulin delivery fora user being roughly limited to the user's TDI-based insulin.

FIG. 3 illustrates an example of adjusting a prediction trajectory basedon a new glucose measurement value.

FIG. 4 illustrates an example of effects of a rate of change filter toblood glucose value predictions made by an example of an artificialpancreas algorithm intended to lower an estimated trajectory of futureblood glucose values.

FIG. 5 illustrates an example of constraining maximum insulin delivery.

FIG. 6 illustrates an example of constraining insulin delivery to nomore than a fixed rate of insulin when glucose values are below apredetermined threshold.

FIG. 7A shows a flow chart of a process utilizing predicted futureglucose values to adjust an insulin basal delivery according to examplesdescribed herein.

FIG. 7B shows a flow chart of a process for implementing an example of asafety constraint in response to a communication issue within a drugdelivery system such as the example drug delivery system shown in FIG.1.

FIG. 8 shows a flow chart of a process example for implementing anexample of a safety constraint in response to an over-delivery ofinsulin.

FIG. 9 shows a flow chart of a process example for implementing anexample of a safety constraint in response to an under-delivery ofinsulin.

FIG. 10 shows a flow chart of a process example for implementing anexample of a response to the rapid rate of increase in the glucoseconcentration.

FIG. 11 shows a flow chart of a process example for implementing anexample of a response that increases a likelihood of suspension ofinsulin.

FIG. 12 shows a flow chart of a process example for implementing anexample of a response that attenuates insulin delivery.

DETAILED DESCRIPTION

Various examples provide safety constraints for a controlalgorithm-based drug delivery system, also referred to as an “artificialpancreas” algorithm-based system or more generally an artificialpancreas algorithm, that provides automatic delivery of a drug based onsensor input. For example, the artificial pancreas (AP) algorithm whenexecuted by a processor enables a system to monitor a user's glucoselevels, determine an appropriate level of insulin for the user based onthe monitored glucose levels (e.g., glucose concentrations or glucosemeasurement values) and other information, such as user-providedinformation, and subsequently dispense insulin to the user. In addition,the AP algorithm utilizes the monitored glucose levels and otherinformation to generate and send a command to a medical device, such asa pump, to control, for example, deliver a bolus dose of insulin to theuser, change the amount or timing of future doses, or other controllablefunctions. The safety constraints described herein provide safeoperation of the drug delivery system during various operationalscenarios including, for example, during times when the sensor input ismissing or erroneous, unexpected events such as an unplanned meal. Thedisclosed safety constraints mitigate under-delivery or over-delivery ofthe drug while not overly burdening the user of the drug delivery systemand without sacrificing performance of the drug delivery system.

FIG. 1 illustrates an example of a drug delivery system 100. The drugdelivery system 100 can include a medical device 102, a sensor 104, anda management device (PDM) 106. In various examples, the drug deliverysystem 100 can be an automated drug delivery system. In variousexamples, the medical device 102 can be attached to the body of a useror patient and can deliver any therapeutic agent, including any drug ormedicine, such as insulin or the like, to a user. For example, themedical device 102 can be a wearable device. For example, the medicaldevice 102 can be directly coupled to a user (e.g., directly attached toa body part and/or skin of the user). For example, a surface of themedical device 102 can include an adhesive to facilitate attachment to auser.

The medical device 102 can include a number of components to facilitateautomated delivery of a drug (also referred to as a therapeutic agent)to the user. The medical device 102 can store and provide any medicationor drug to the user. In various examples, the medical device 102 can bean automated, wearable insulin delivery device. For example, the medicaldevice 102 can include a reservoir 125 for storing the drug (such asinsulin), a needle or cannula for delivering the drug into the body ofthe user, and a pump mechanism (mech.) 124 or other drive mechanism fortransferring the drug from the reservoir 125, through the needle orcannula (not shown), into the body of the user. The medical device 102can also include a power source 128 such as a battery for supplyingpower to the pump mechanism 124 and/or other components (such as theprocessor 121, memory 123, and the communication device 126) of themedical device 102. The medical device 102 is often referred to as apump, or an insulin pump, in reference to the operation of expelling adrug from the reservoir 125 for delivery to the user. The reservoir 125may be configured to store insulin, morphine, or another drug suitablefor automated delivery.

The medical device 102 can provide the stored therapeutic agent to theuser based on information provided by the sensor 104 and/or themanagement device (PDM) 106. For example, the medical device 102 canalso contain analog and/or digital circuitry that may be implemented asa processor 121 (or controller) for controlling the delivery of themedication. The circuitry may be used to implement the processor 121,and may include discrete, specialized logic and/or components, anapplication-specific integrated circuit, a microcontroller or processorthat executes software instructions, firmware, programming instructions(such as artificial pancreas algorithm 129) stored in memory devices(such as memory 123), or any combination thereof. In various examples,the processor 161 can be configured to cause the pump to deliver dosesof the medication to a user at predetermined intervals. For example, theprocessor 161 may execute a control algorithm, such as an artificialpancreas algorithm (AP Algo) 169. The size and/or timing of the dosesmay be programmed, for example, into an artificial pancreas algorithm169 using a wired or wireless link by the user or by a third party (suchas a health care provider, medical device manufacturer, or the like).

Instructions for determining the delivery of the medication to the user(e.g., the size and/or timing of any doses of the medication) canoriginate locally (e.g., based on programming instructions, such as aninstance of the artificial pancreas algorithm 129, stored in the memory123 that is coupled to the medical device 102 used to makedeterminations by the medical device 102) or can originate remotely andbe provided to the medical device 102. Remote instructions can beprovided to the medical device 102 over a wired or wireless link by theelectronic device (PDM) 106, which executes the artificial pancreasalgorithm 169. The medical device 102 can execute any receivedinstructions (originating internally or from the management device 106for the delivery of the medication to the user. In this way, undereither scenario, the delivery of the medication to a user can beautomated.

In various examples, the medical device 102 can communicate via awireless link 110 with the management device 106. The management device106 can be any electronic device such as, for example, an Apple Watch®.The management device 106 can be a wearable wireless accessory device.The wireless links 108, 110 and 112 may be any type of wireless linkprovided by any known wireless standard. As an example, the wirelesslinks 108, 110 and 112 may enable communications between the medicaldevice 102, the management device 106 and sensor 104 based onBluetooth®, Wi-Fi®, a near-field communication standard, a cellularstandard, or any other wireless optical or radio-frequency protocol.

The sensor 104 may be a glucose sensor operable to measure blood glucoseand output a blood glucose value or data that is representative of ablood glucose value. For example, the sensor 104 may be a glucosemonitor or a continuous glucose monitor (CGM). The sensor 104 mayinclude a processor 141, a memory 143, a sensing/measuring device 144,and communication device 146. The communication device 146 of sensor 104can include one or more sensing elements, an electronic transmitter,receiver, and/or transceiver for communicating with the managementdevice 106 over a wireless link 112 or with medical device 102 over thelink 108. The sensing/measuring device 144 may include one or moresensing elements, such as a glucose measurement, heart rate monitor, orthe like. For example, the sensor 104 can be a continuous glucosemonitor (CGM). The processor 141 may include discrete, specialized logicand/or components, an application-specific integrated circuit, amicrocontroller or processor that executes software instructions,firmware, programming instructions stored in memory devices (such asmemory 143), or any combination thereof. For example, the memory 143 maystore an instance of an AP algorithm 149 that is executable by theprocessor 141. Although the sensor 104 is depicted as separate from themedical device 102, in various examples, the sensor 104 and medicaldevice 102 may be incorporated into the same unit. That is, in variousexamples, the sensor 104 can be a part of the medical device 102 andcontained within the same housing of the medical device 102 (e.g., thesensor 104 can be positioned within or embedded within the medicaldevice 102). Glucose monitoring data (e.g., measured glucose values)determined by the sensor 104 can be provided to the medical device 102and/or the management device 106 and can be used to adjust automateddelivery of insulin by the medical device 102. The management device 106can be a personal diabetes manager.

The sensor 104 can also be coupled to the user by, for example, adhesiveor the like and can provide information or data on one or more medicalconditions and/or physical attributes of the user. The information ordata provided by the sensor 104 may be used to adjust drug deliveryoperations of the medical device 102. The management device 106 can beused to program or adjust operation of the medical device 102 and/or thesensor 104. The management device 106 can be any portable electronicdevice including, for example, a dedicated controller, such as processor161, a smartphone, or a tablet. In an example, the management device(PDM) 106 may include a processor 161, a management device memory 163,and a communication device 164. The management device 106 may containanalog and/or digital circuitry that may be implemented as a processor161 (or controller) for executing processes to manage a user's glucoseand for controlling the delivery of the medication. The processor 161may also be operable to execute programming code stored in themanagement device memory 163. For example, the management device memory163 may be configured to store an artificial pancreas algorithm 169 thatmay be executed by the processor 161. The processor 161 may whenexecuting the artificial pancreas algorithm 169 may be operable toperform various functions, such as those described with respect to theexamples in the figures. The communication device 164 may be a receiver,a transmitter or a transceiver that operates according to one or moreradio-frequency protocols.

The medical device 102 and the sensor 104 may communicate over awireless link 108. The medical device 102 and the management device 106may communicate over a wireless link 110. The sensor 104 and themanagement device 106 may communicate over a wireless link 112. Thewireless links 108, 110, and 112 may be any type of wireless linkprovided by any known wireless standard. As an example, the wirelesslinks 108, 110, and 112 can provide communication links based onBluetooth, Wi-Fi, a near-field communication standard, a cellularstandard, or any other wireless protocol via the respectivecommunication devices 126, 146 and 164. In some examples, the medicaldevice 102 and/or the management device 106 may include a userinterface, such a keypad, a touchscreen display, buttons, a microphone,a speaker, a display or the like, that is operable to allow a user toenter information and allow the management device to output informationfor presentation to the user.

In various examples, the drug delivery system 100 can be an insulin drugdelivery system. In various examples, the medical device 102 can be theOmniPod® (Insulet Corporation, Billerica, Mass.) insulin delivery deviceas described in U.S. Pat. Nos. 7,303,549, 7,137,964, or U.S. Pat. No.6,740,059, each of which is incorporated herein by reference in itsentirety.

In various examples, the drug delivery system 100 can implement theartificial pancreas (AP) algorithm (and/or provide AP functionality) togovern or control automated delivery of insulin to a user (e.g., tomaintain euglycemia—a normal level of glucose in the blood). The APalgorithm can be implemented by the medical device 102 and/or the sensor104. The AP algorithm can be used to determine the times and dosages ofinsulin delivery. In various examples, the AP algorithm can determinethe times and dosages for delivery based on information known about theuser, such as the user's sex, age, weight, or height, and/or oninformation gathered about a physical attribute or condition of the user(e.g., from the sensor 104). For example, the AP algorithm may determinean appropriate delivery of insulin based on glucose level monitoring ofthe user through the sensor 104. The AP algorithm may also allow theuser to adjust insulin delivery. For example, the AP algorithm may allowthe user to issue (e.g., via an input) commands to the medical device102, such as a command to deliver an insulin bolus. In some examples,different functions of the AP algorithm may be distributed among two ormore of the management device 106, the pump 102 or the sensor 104. Inother examples, the different functions of the AP algorithm may beperformed by one device, such the management device 106, the pump 102 orthe sensor 104. In various examples, the drug delivery system 100 canoperate according to or can include any of the features orfunctionalities of the drug delivery systems described in U.S. patentapplication Ser. No. 15/359,187, filed Nov. 22, 2016, which is hereinincorporated by reference in its entirety.

As described herein, the drug delivery system 100 or any componentthereof can be considered to provide AP functionality or to implement anAP algorithm. Accordingly, references to the AP algorithm (e.g.,functionality, operations, or capabilities thereof) are made forconvenience and can refer to and/or include operations and/orfunctionalities of the drug delivery system 100 or any constituentcomponent thereof (e.g., the medical device 102 and/or the managementdevice 106). The drug delivery system 100—for example, as an insulindelivery system implementing an AP algorithm—can be considered to be adrug delivery system or an AP algorithm-based delivery system that usessensor inputs (e.g., data collected by the sensor 104).

Since the drug delivery system 100 relies on sensor input for properoperation of drug delivery, the drug delivery system 100 may imposedelivery limits for safety reasons. While delivery constraints may beimposed to ensure safe automatic delivery of a drug (e.g., insulin) tothe user, it may be, in some examples, desirable to not have theconstraints overly reduce AP algorithm control performance or to overlyburden the user. Techniques described herein enable the drug deliverysystem 100 to maximize user safety while optimizing glucose controlperformance and minimizing any additional burden or inconvenience placedon the user.

The sensor 104—for example, as a CGM—can operate with or otherwiseexhibit sensor bias, drift, or other discrepancies of determined datavalues that could lead to over-delivery or under-delivery of a drug tothe user. The techniques described herein provide safety constraints foroperation of the drug delivery system 100 that include safetymitigations in case of failure of the sensor 104, errant values providedby the sensor 104, and/or missing data from the sensor 104, as well asfrom other risks associated with relying on the sensor 104. Thetechniques described herein also provide safety constraints specific tohigher risk conditions such as lower glucose values and a response ofthe implemented AP algorithm to outside perturbations, such as rescuecarbohydrates or the like.

The drug delivery system 100, in some examples, may be a wearable,automated drug delivery system that includes the medical device 102, thesensor 104, and a management device 106. In one example of a wearable,automated drug delivery system, the medical device 102 may be a wearableinsulin delivery device, the management device 106 may be a handheldelectronic computing device, and the sensor 104 may be a continuousglucose monitor. The management device 106 can be a mobile device orcellphone or can be a dedicated custom electronic device. As part of awearable, automated drug delivery system, the medical device 102 and thesensor 104 may each be directly coupled to a user.

The sensor 104 can provide sensor data to the medical device 102 and/orthe management device 106. The management device 106 can include acontroller or processor and a memory. The memory can store instructionsthat can be executed by the controller or processor. The instructionscan implement an “artificial pancreas” algorithm when executed. Ingeneral, the management device 106 can include a controller fordetermining a delivery of insulin to the user (e.g., in terms of dosageamounts and times) based on data from the sensor 104 and providing acorresponding instruction regarding the determined delivery of theinsulin to the medical device 102.

In various examples, as mentioned above, the sensor 104 can be providedas part of or embedded within the wearable insulin delivery device 102.Additionally, in various examples, as mentioned above, the system 100can include an intermediate wireless device (e.g., the management device106) that can relay information wirelessly between the devices depictedin FIG. 1.

In general, the system 100 can automatically monitor glucose levels ofthe user, automatically determine a delivery of insulin to the userbased on the monitored glucose levels, and automatically provide thedetermined amount of insulin to the user. Each of these steps can beperformed without any user input or interaction. In various examples, auser confirmation can be required before the insulin is provided to theuser as discussed above. For example, when management device 106 isimplemented as a cellphone, for added security, the user can be requiredto confirm or acknowledge the determined delivery of insulin to theuser. Without receiving such confirmation, the insulin delivery may beblocked or prevented. This security feature can mitigate hacking orother cybersecurity risks.

In various examples, the drug delivery system 100 can operate such thatglucose values are regularly provided by the sensor 104 to the APalgorithm executing on a processor (e.g., to the medical device 102and/or the management device 106). For example, glucose values can beprovided periodically such as, for example, approximately every 5minutes (e.g., corresponding to a control cycle of the system 100) orthe like. The medical device 102 can adjust an amount of insulin fordelivery based on the received glucose values.

It may be helpful to briefly describe an operational example performedby system 100 with reference to FIG. 7A. The AP algorithm 169 or 129 ofFIG. 1 executing on a management device processor 161 or 121 of FIG. 1may implement process 700 as shown in FIG. 7A. At 710, the AP algorithmmay receive at regular time intervals a glucose measurement via awireless connection (e.g., 108 or 112) with a glucose monitor (such assensor 104). Regular time intervals may be intervals, such asapproximately every 5 minutes, 10 minutes, hourly, a particular time(s)of day, or the like. Based on the prior glucose values, the AP algorithmmay predict future glucose values (720). Based on the predicted futureglucose values from 720, the AP algorithm may, at 730, adjust insulindelivery, for example, by adjusting an insulin basal delivery rate,based on predicted future glucose values. At 740, insulin may bedelivered via the medical device according to the adjusted insulin basaldelivery rate. For example, the medical device 102 can deliver an amountof insulin to the user at regular time periods, such as approximatelyevery 5 minutes or the like, with the amount adjusted based on receivedglucose values.

The process 700 of the example of FIG. 7A may continue with theprocessor receiving a subsequent glucose measurement value via thewireless connection with the glucose monitor. The total dailyinsulin-based basal glucose level may be determined using the receivedsubsequent glucose measurement value and the prior glucose values from apast time period. The processor may compare the total dailyinsulin-based basal glucose level to a user-set basal glucose setpoint(e.g., 110-120 mg/dL or the like). In response to a result of thecomparison indicating the user-set basal glucose setpoint is erroneous,the processor may determine an updated insulin basal delivery rate to bedelivered by the medical device. In the example, the updated insulinbasal delivery rate is updated from the adjusted insulin basal deliveryrate from step 730.

Techniques described herein provide safety constraints for the deliveryof insulin based on known or unknown failures or inaccuracies of thesensor 104. Various operational scenarios and examples of responsethereto by the system 100 are described herein.

In an operational example, the system 100 may react with an automaticsuspension of insulin deliver when a blood glucose measurement id belowa glucose threshold according to the following discussion. In theoperational example, regardless of predictions made by the AP algorithm,the AP algorithm can enter an automatic suspension mode when a glucoselevel determined by the sensor 104 is below a threshold (e.g., below 60mg/dL). The AP algorithm can automatically resume delivering insulinbased on model prediction control (MPC) algorithms when glucose valuesrise above the threshold. In various examples, when hypoglycemia isdetected (e.g., based on glucose levels being below a predeterminedthreshold), the drug delivery system 100 can stop delivery of insulin tothe user. Automatically resuming delivery to the user can be providedwhen the glucose levels rise above the threshold. MPCalgorithms—operating as part of the AP algorithm—can be used forautomatic start-up.

In other operational examples, the system 100 may react with toconstrain the AP algorithm to a basal below a threshold according to thefollowing discussion. In various examples, the AP algorithm can beconstrained to deliver no more than a fixed rate of insulin when glucosevalues are below a predetermined threshold. FIG. 6 illustrates anexample of constraining delivery to no more than a fixed rate of insulinunder such a scenario. The AP algorithm may attenuate or suspend insulindelivery when glucose values are below the threshold. The fixed rate ofinsulin delivery can be personalized to the user and can be determinedby the user's entered basal rate, a rate calculated by the APalgorithm-based on average AP algorithm-based daily delivery, a ratebased on the user's weight, age, total daily insulin (TDI), and/or othermetrics.

As an example, a “TDI-based basal” can be calculated by multiplying theuser's total daily insulin requirement, or the sum of insulin deliveriesof the user for a past time period, such as 24 hours, by 0.5 (assumingthat the basal would naturally be covered by half of the user's totalinsulin requirements per day, while the other half of the user's totalinsulin requirements per day is covered by insulin provided at mealtime, or as a bolus), then dividing that value by 24 (i.e. number ofhours in a day). For instance, if the user's TDI is 48, the user'sTDI-based basal is 48*0.5/24, or 1 U/h. This gives an estimate of thetotal basal the user may actually need, daily, with reducedsusceptibility to any erroneously user-entered basal values.

The predetermined threshold may be a fixed (e.g., hard wired) threshold,a user set threshold, or a user set threshold adjusted by a fixed(positive or negative) deviation value (e.g., the user set targetglucose less a fixed 10 mg/dL adjustment). As an example, the fixed rateof insulin delivery can be roughly half of a set basal delivery whenglucose levels are below the predetermined threshold. FIG. 2 illustratesan example of the fixed rate of insulin delivery for a user beingroughly limited to the user's TDI-based insulin.

Techniques described herein can account for sensor values provided tothe AP algorithm/the drug delivery system 100 that may be incorrect orerroneous for any number of reasons by providing sensor independentsafety constraints. In such instances, the system 100 may implement aglucose independent safety constraint for maximum delivery of insulinover a period of time as described below.

For example, FIG. 8 shows a flow chart of a process for implementing anexample of a safety constraint in response to an over-delivery ofinsulin. In various examples, such as in process 800, the AP algorithmcan be constrained to a maximum fixed rate of insulin delivery if the APalgorithm has delivered more than a preset volume of insulin,personalized to the user, over a set amount of time. For example, aprocess is operable to upon execution of an AP algorithm to deliver amaximum amount of the user's entered basal or TDI based basal if the APalgorithm has delivered 3 times the sum of the user's basal delivery inthe past 3 hours—often referred to as the 3×3 rule). The processor (suchas processor 161) coupled to a medical device (such as 102, which may bea pump) may determine that the medical device has delivered more than apreset volume of insulin over a set amount of time (810). An amount ofinsulin to be delivered by the medical device as an adjusted basaldosage may be adjusted based on a calculation using a volume of insulindelivered over the set amount of time and a total daily insulin to bedelivered as calculated by an artificial pancreas algorithm (820). At830, the processor may limit the amount of insulin to be delivered asthe adjusted basal dosage to a maximum volume of a user's basal insulindelivery volume divided by either a time increment, at which theadjusted basal dosage is administered or a percentage of an hourly basalrate. In the example of FIG. 8, the time increment may be at regulartime intervals. Examples of regular time intervals may be less than anhour, such as for example, 5 minutes, 9 minutes, 23 minutes or the like,longer than an hour, or the like. Alternatively, the time increments maysimply be increments that are based on a counter value or the like.

The AP algorithm may attenuate or suspend insulin delivery in this casebut is constrained to a maximum insulin delivery. FIG. 5 illustrates anexample of constraining maximum insulin delivery. The fixed rate ofinsulin delivery and the preset volume of insulin delivery can bepersonalized to the user and can be determined by the user's enteredbasal rate, a rate calculated by the AP algorithm-based on average APalgorithm-based daily delivery, a rate based on weight, age, total dailyinsulin delivered, total daily basal delivered, or other metrics.Additionally, the constrained delivery may be accompanied by an alert oralarm to the user indicating the same.

In other instances, the system 100 may implement a glucose independentsafety constraint for maximum delivery of insulin at one time asdescribed below. In various examples, the AP algorithm can beconstrained to deliver no more than a fixed volume of insulinpersonalized to the user over any one control cycle. For example, the APalgorithm can deliver no more than 6 times the user's basal divided in5-minute increments (e.g., often referred to as the 6× rule), or 50% ofthe hourly basal rate in one algorithm delivery (e.g., basal rate of 1.2u/hr/2=0.6 units). The fixed volume of insulin delivery can bepersonalized to the user and can be determined by the user's enteredbasal rate, a rate calculated by the AP algorithm-based on average APalgorithm-based daily delivery, a rate based on weight, age, total dailyinsulin delivered, total daily basal delivered, or other metrics.

In further instances, the system 100 may implement a glucose independentsafety constraint to limit under delivery of insulin as described below.In various examples, the AP algorithm/the drug delivery system 100 canimplement a negative insulin on board (JOB) constraint. The AP algorithmcan enter a fixed rate of insulin delivery mode personalized to the userif the AP algorithm under-delivers insulin by more than a volume ofinsulin personalized to the user over a period of time incorporating theJOB. For example, 2.5 times the user's basal in the past 4 hours, afterapplying an IOB decay curve. The AP algorithm calculates the remainingIOB at each control cycle. A negative IOB determination can indicatethat the algorithm has been delivering below a fixed personalized rate(i.e., basal) for a period of time of insulin delivery history. Thenegative IOB value can be the cumulative “under basal” deliveryaccounting for IOB decay.

FIG. 9 illustrates a flow chart of a process for implementing an exampleof a safety constraint in response to an under-delivery of insulin. Inthe process 905, a processor (such as 121 or 161 of FIG. 1) may receivesignals from a medical device indicative of an amount of insulin beingdelivered by the medical device (such as 102 of FIG. 1), the processormay maintain a total amount (e.g., volume) of insulin delivered as, forexample, an insulin delivery history, in a memory (such as 123 or 163 ofFIG. 1). The insulin delivery history may, for example, span minutes,hours, days, weeks, months, a time period between doctor appointments,years, or the like. In the example process 905, a processor of a medicalmanagement device (such as 106 of FIG. 1) may determine in response toreceipt of a glucose measurement value from a sensor (such as 104 ofFIG. 1) that a medical device has been delivering insulin below a fixedpersonalized basal rate for a period of time of insulin delivery history(915). A result of delivering insulin below a fixed personalized basalrate is a negative insulin on board value. At 925, the processor maydetermine that the negative insulin on board value is greater than threetimes a user's total daily insulin-based hourly basal value. In responseto the negative insulin on board value being greater than a multiple(such as 3, 6, 2.5 or the like) of a user's total daily insulin-basedhourly basal value, delivery of insulin by the medical device may bealtered to deliver a total daily-based basal or a personalized volume ofinsulin (935). At 945, a notification message may be output requestingthe user to acknowledge the altered delivery of insulin or a requirementfor a new calibration value for use by the processor in calculating acalibrated amount of insulin for delivery.

The process 905 may continue at 955 the process 905 determines whether auser acknowledgment of request for a new calibration value has beenreceived. In response to receipt of user acknowledgement of the altereddelivery of insulin, the medical device continues the altered deliveryof insulin (962). In response to receipt of the new calibration value,the processor generates the new calibration value (965) and the newcalibration value is applied by the processor to calculate thecalibrated amount of insulin for delivery (975).

In various examples, if this negative IOB determination is greater than3 times the user's TDI-based hourly basal value, the AP algorithm canrevert to delivering the TDI-based basal or personalized volume ofinsulin and inform the user of the same. User input can be required viaa notification message for the user to acknowledge the system state orrequirement for a new calibration value. The system 100 can deliverbasal until the notification message is acknowledged or the calibrationentered. Further, the system 100 can resume operating in a manner priorto the negative IOB determination in response to a user acknowledgementand/or performance of a calibration of sensor 104, which in thisexample, may be a continuous glucose monitor (CGM).

Disclosed are examples that relate to determining and resolvingcommunication issues, such as those between any of a sensor, such as104, and a pump 102 and/or a management device, such as 106 in a drugdelivery system, such as that described with reference to FIG. 1.

FIG. 7B shows a flow chart of a process for implementing an example of asafety constraint in response to a communication issue within a drugdelivery system such as the example drug delivery system shown inFIG. 1. In various examples, under a scenario where measurement valuesfrom the sensor 104 are not being received by the AP algorithm (e.g.,missing values from the sensor 104), the system 100 may respondaccording to the example process 705 shown in FIG. 7B. In the example ofFIG. 7B, the process 705 may be a response based on the last known value(or values) from the sensor 104. For example, at 715, a processor, suchas 121, 141, or 161, may receive a number of glucose measurement valuesfrom the sensor 104. In the example, each glucose measurement value ofthe number of glucose measurement values may be received at a regulartime interval over a period of time and the regular time interval isless than the period of time. of course, the regular time intervals maybe like those mentioned in the discussion of FIG. 7A. The processor mayuse at least one of the number of received glucose measurement values,at 725, to predict future glucose values. For example, each time the APalgorithm executing on the processor receives a value, a future glucosevalue to be received at a future time interval may be predicted. Theprocessor may determine that a subsequent glucose measurement value hasnot been received within a next regular time interval (735). Forexample, when a glucose measurement value from the sensor 104 isexpected but not received, the system 100 can use the predicted glucosevalues generated when the last received value from the sensor 104 wasreceived. For example, in response to the determination that thesubsequent glucose measurement value has not arrived, a total dailyinsulin-based basal delivery rate may be adjusted to be provided by amedical device based on at least one of the predicted number of futureglucose measurement values (745). The processor may issue instructionsto the medical device, such as 102 of FIG. 2, so insulin, at 755, may bedelivered via the medical device 102 according to the adjusted totaldaily insulin-based basal delivery rate.

In a further example, the insulin may be delivered via the medicaldevice according to the adjusted total daily insulin-based basaldelivery rate for a trusted prediction period of time. In the furtherexample, the processor may further determine to suspend delivery ofinsulin in response to a last-received glucose measurement value beingwithin a particular range of previous glucose measurement values and thetrusted prediction period of time spanned a duration of timecorresponding to a predetermined number of regular time intervals. Thetime period during which delivery of insulin is to be suspended may bedetermined based on a value of the last-received glucose measurementvalue falling within a particular range of a plurality of ranges ofglucose measurement values. In response, a time period for suspendingthe delivery of insulin may be selected from a number of pre-set timeperiods, and the processor may suspend deliver of insulin for theselected time period.

Alternatively, the medical device may deliver the insulin using theprior predicted glucose values (and corresponding insulin dosage values)for an allowed “trusted prediction” period of time. In yet anotherexample, the insulin delivery can continue if the last received valuefrom the sensor 104 was above a threshold and is predicted to deliverabove a baseline rate of insulin, and predictions can be used for 15minutes or longer.

If the values from the sensor 104 do not resume before the trustedprediction period of time ends, then the AP algorithm response maydepend on the last received value (or values) from the sensor 104 andthe predictions based thereon by the AP algorithm. In various examples,the AP algorithm can respond with insulin delivery and possibly anotification to the user via the management device 106, for example,according to the following table:

Loss of signal when last valid value from Notification to the CGM sensormeets the System/AP/Algorithm System/AP/Algorithm user (afterconsecutive following condition response response (extended bolus)missing points) CGM value > Trust prediction for 3 missing Continuedelivering Notify the user of Setpoint - 10 estimated glucose values(EGVs). extended bolus for 3 missing points after 1 Afterwards, if stillmissing points. If still missing hour. values or communication fromcommunication from the the sensor: sensor: 1. If AP algorithm 1. If APalgorithm recommended suspension for recommended delivery below allthree cycles, suspend the new basal for all three basal for 20 minutes,then cycles, revert to basal resume basal. without extended portion for1 hour. 2. If AP algorithm 2. If AP algorithm recommended two or lessrecommended delivery below suspensions during these the new basal fortwo or three cycles, resume basal. less suspensions during these threecycles, continue extended bolus. Setpoint − 10 ≥ Trust prediction for 3Continue delivering Notify the user of CGM value > 70 missing EGVs.Afterwards, extended bolus for 3 missing points after 1 if still missingvalues points. If still missing hour. or communication from thecommunication from the sensor: sensor: 1. If AP algorithm 1. If APalgorithm recommended two or more recommended delivery below suspensionsduring these the new basal for two or three cycles, suspend basal morecycles, revert to basal for 20 minutes, then resume without extendedportion for basal. 1 hour. 2. If AP algorithm 2. If AP algorithmrecommended one or 0 recommended delivery below suspensions during thesethe new basal for one or 0 three cycles, resume basal. cycles duringthese three cycles, continue extended bolus. 70 ≥ CGM Trust predictionfor 3 Continue delivering Notify the user of value > 60 missing EGVs.Afterwards, extended bolus for 3 points. missing points after 1 if stillmissing values or If still missing hour. communication from thecommunication from the sensor: sensor: 1. If AP algorithm 1. If APalgorithm recommended any suspensions recommended delivery below duringthese three cycles, the new basal for any cycle, suspend basal for 45revert to original basal. minutes, then resume basal. 2. If AP algorithm2. If AP algorithm delivered any amount above recommended delivery at orzero for all three cycles, above the new basal for all resume basal.three cycles, continue extended bolus. 60 ≥ CGM value Suspend for 60minutes in Revert to basal without Notify the user of closed loop andthen resume extended portion until new missing points after 1 basal. CGMvalue. hour.

In various examples, each cycle (e.g., control cycle) referred to abovecan be of any duration including, but not limited to, approximately 5minutes, 8 minutes or the like.

In various examples, the AP algorithm may permanently or temporarilyattenuate the extended portion of an extended bolus in response toglucose level alone, glucose level and AP algorithm predictions, or APalgorithm predictions alone. In various examples, the AP algorithm mayautomatically cancel an extended portion of an extended bolus inresponse to glucose levels alone, glucose levels and AP algorithmpredictions, or AP algorithm predictions alone. The extended portion ofthe extended bolus may be applied to correction or meal IOB for futureautomated or manual insulin dosing decisions. If applied to correctionIOB, the AP algorithm may be more conservative in low glycemia. Ifapplied to correction IOB, the AP algorithm may be more conservative inhigh glycemia.

In other instances, the system 100 may limit the system's response to ahypoglycemic event response such as ingesting rescue carbohydrates asdescribed below. For example, in the case where the user experiences ahypoglycemic event (e.g., glucose concentration is below a 70 mg/dLhypoglycemic threshold), the user may act by ingesting fast actingcarbohydrates to quickly increase the user's blood glucose. This is anunannounced meal to the system 100 which has the potential to be viewedby the system 100 as a very rapid increase in glucose. In response, thesystem 100 may respond by delivering additional insulin to compensatefor these carbohydrates. However, this may not be a preferred responseas the carbohydrates were taken specifically to increase the glucoselevels of the user and the user may not want to receive insulin tocounteract these carbohydrates.

In an example, the processor, by executing programming code stored in amemory, may perform a function to determine, based on a measurementprovided by a glucose monitor (such as sensor 104 of FIG. 1), ahypoglycemic event has occurred. In response to the determination ahypoglycemic event has occurred, the system 100 via a processor, such as121, 141 or 161, may modify the adjusted insulin basal rate. Forexample, the processor may modify the adjusted insulin basal rate bysetting a reduced temporary basal rate of the medical device that isused for dosing calculations for a predetermined period of timefollowing the determination of the occurrence of the hypoglycemic event.Alternatively, the system 100 via a processor may set a reducedtemporary basal rate that may be used in dosing calculations until aglucose rate of change decreases below a predetermined threshold afterthe determination of the occurrence of the hypoglycemic event. Inanother alternative, the system 100 may set a reduced temporary basalrate that can be used in dosing calculations until the blood glucose (ameasured by a sensor, such as 104 of FIG. 1) is above a predeterminedthreshold following the determination of the occurrence of thehypoglycemic event.

For example, techniques for detecting such a scenario (e.g., the system100 detecting an ingestion of fast acting carbohydrates to address ahypoglycemic event) are described herein and may include the followingdetection techniques: 1) Detection of a rapid rate of increase inglucose concentrations beyond a certain threshold (e.g., 2 mg/dL perminute); 2) Detection of a rapid rate of increase in glucoseconcentration across a certain series of glucose concentration valueswhen the first value of the series is below a first threshold (e.g.,detecting a rapid rate of change as in (1) when the first value of theseries is below the hypoglycemic threshold of 70 mg/dL); 3) Detection ofa rapid rate of increase in glucose concentration when any value of theseries is below a second threshold (e.g., detecting a rapid rate ofchange as in (1) when any value in the series is below the system targetglucose of 120 mg/dL); and/or 4) Detection of a rapid change in thesecond derivative (e.g., acceleration) of the glucose concentrationhigher than a predetermined threshold (e.g., finding a significantchange in the rate of change of glucose concentrations across any numberof points—e.g., from a glucose concentration decrease of 2 mg/dL perminute to an increase of 2 mg/dL per minute).

FIG. 10 is a flowchart of an example process for implementing an exampleof a response to a rapid rate of increase in glucose concentration, ormeasurements. In the example of FIG. 10, a processor executingprogramming code, such as an AP algorithm, may perform a process 1000.The processor may be operable to obtain a series of glucoseconcentration values as measured at regular time intervals by a glucosemonitor (1010). The processor may detect a rapid rate of increase in aglucose concentration and may implement a response to the rapid rate ofincrease in the glucose concentration in reaction to the detection ofthe rapid rate of increase in the glucose concentration, or measurements(1020).

For example, in response to detecting (using, for example, the above thedetection techniques) a rapid rate of increase in glucose concentrationthat is indicative of the ingestion of fast acting carbohydrates toaddress a hypoglycemic event, a response to detection of the ingestionof fast acting carbohydrates to address a hypoglycemic event (e.g., bythe system 100) may be implemented (1030). In an example, a processorwithin system 100, upon executing the programming code, may be operableto perform functions when implementing a response to the rapid rate ofincrease in the glucose concentration such as those described below.Examples of techniques implemented by the system via the processorexecuting programming code may implement a response the detection of theingestion of fast acting carbohydrates (based on the rapid rate ofincrease in glucose concentration) in response to the rapid rate ofincrease in the glucose concentration are described below and mayinclude one or more of the following:

i. Limit the AP algorithm recommended delivery to a delivery maximumpersonalized to the user (e.g., no greater than basal) for a specifiedduration of time (e.g., 25 minutes) after the event.

ii. Limit the AP algorithm recommended delivery to a delivery maximumpersonalized to the user (e.g., no greater than basal) until a rate ofchange decreases below a predetermined threshold after a hypoglycemicevent.

iii. Limit the AP algorithm recommended delivery to a delivery maximumpersonalized to the user (e.g., no greater than basal) until the glucoseis above a predetermined threshold after a hypoglycemic event.

iv. Limit the AP algorithm delivery of insulin with any combination oftechniques i., ii., or iii.

v. Reduce the AP algorithm gain, cost function, and/or aggressivenessfor a predetermined period of time after the hypoglycemic event. The APalgorithm gain, for example, may be the model gain, which is anindication of how much a user's glucose will change per unit of insulin.A cost function may, for example, be a measure of the excursion of theglucose error value from the set point. The set point may be, forexample, a target glucose value (e.g., 113 mg/dL), which may be, in theexample, a setting within a range of approximately 110-120 mg/dL, or thelike. In general, the further away a glucose measurement value is(either higher or lower) from the target glucose value, the higher thecost value generated by the cost function, while a glucose measurementvalue closer to the target glucose value has a lower cost value. In anexample, the cost function may be related to deviations in the measuredglucose and expected glucose and/or deviations in an expected amount ofinsulin and the basal insulin amount. Aggressive may be related to theresponsiveness of the AP algorithm to deviations in the cost function.Aggressiveness may be viewed as how quickly the AP algorithm aims toreduce the cost function and drive the glucose measurement value to theset point. A high aggressive setting may attempt to drive the glucosemeasurement value to the set point quickly, while a low aggressivesetting may correct the glucose value more smoothly.

vi. Reduce the AP algorithm gain, cost function, and/or aggressivenessuntil the glucose is above a predetermined threshold after ahypoglycemic event.

vii. Reduce the AP algorithm gain, cost function, and/or aggressivenessuntil the rate of change decreases below a predetermined threshold aftera hypoglycemic event.

viii. Limit the AP algorithm delivery of insulin with any combination oftechniques v, vi, or vii.

ix. Implement a glucose rate of change filter for a predetermined periodof time following a hypoglycemic event. FIG. 4 illustrates an example ofhow the rate of change filter can affect the predictions made by the APalgorithm to result in a lower estimate trajectory of future bloodglucose values. A rate of change filter may be used by a processorexecuting the AP algorithm (such as processor 121, 141 or 161) to limitthe rate of change of glucose that is seen (acted upon) by, or providedto, the AP algorithm. For example, glucose measurement values may beprovided by a glucose sensor. Using multiple glucose measurement values,a rate of change of the glucose measurement values may be determined.The rate of change filter may be used to either attenuate or amplify therate of change of glucose measurement values utilized by the APalgorithm. Application of the rate of change filter may, for example, belimited for a duration of time from when the processor determines theglucose measurement value first went below a predetermined threshold orfrom a time that the glucose comes above a predetermined threshold afterbeing triggered. For example, if the rate of change is high (e.g., 4mg/dL) following rescue carbohydrate ingestion, the rate of changefilter can limit the rate of change seen by the algorithm to 2 mg/dL for30 minutes after coming back above 70 mg/dL to reduce the AP algorithmresponse to the carbohydrates.

x. Implement a glucose rate of change filter following a hypoglycemicevent until the rate of change decreases below a predeterminedthreshold.

xi. Implement a glucose rate of change filter following a hypoglycemicevent until the glucose is above a predetermined threshold.

xii. Implement a glucose rate of change filter at all times.

xiii. The rate of change filter may be for both positive and negativerate of change or a positive rate of change only.

xiv. Implement a glucose rate of change filter using any combination oftechniques ix, x, xi, xii, or xiii.

xv. The system 100 can set a reduced target blood glucose value that canbe used for dosing calculations for a predetermined period of timefollowing a hypoglycemic event.

xvi. The system 100 can set a reduced target blood glucose value thatcan be used for dosing calculations until a glucose rate of changedecreases below a predetermined threshold after a hypoglycemic event.

xvii. The system 100 can set a reduced target blood glucose value thatcan be used for dosing calculations until the glucose is above apredetermined threshold.

xviii. The system 100 can set a reduced target blood glucose value forany combination of techniques xv, xvi, or xvii above.

All aforementioned predetermined thresholds may be user-defined, fixed,adapted over time using AP algorithm parameters, or personalized to theuser based on TDI or a TDI derivative. In addition, other responses,such as reducing a temporary basal rate that is used for dosingcalculations are described in more detail with reference to otherexamples.

Returning to the system example of FIG. 1, the management deviceprocessor 161 of management device 106 in the system 100 may beoperable, upon execution of the programming instructions including theartificial pancreas algorithm, to perform various functions. Forexample, the management device processor may determine times and dosagesof insulin to be delivered to a user. The times and the dosages may becalculated based on a user's sex, a user's age, a user's weight, auser's height, and/or on glucose levels provided by the sensor.

In an example, the management device processor 161 may determine anoccurrence of a hypoglycemic event. In response to the determination ofthe occurrence of the hypoglycemic event, the management deviceprocessor may implement a glucose rate of change filter for apredetermined period of time. The glucose rate of change filter maylimit a rate of change in measured blood glucose values used by theartificial pancreas algorithm in the determination of a time fordelivery of insulin and a dosage of the insulin being delivered. Themanagement device processor may instruct the medical device via wirelesslink 110 to deliver the determined dosage of the insulin at thedetermined time for delivery. The management device processor 161 maylimit a duration of time for implementation of the glucose rate ofchange filter by applying one or more limitations, including: a timewhen a measured glucose value first went below a predetermined thresholdrelated to the hypoglycemic event, from a time that a measured glucosevalue comes above another predetermined threshold after the occurrenceof the hypoglycemic event, until the glucose rate of change decreasesbelow a further predetermined threshold, or until the glucose is abovean additional predetermined threshold.

The management device processor 161 may be further operable to apply theglucose rate of change filter at one of: at all times, when both apositive and a negative glucose rate of change are determined, or onlywhen a positive glucose rate of change is determined.

In another example, the management device processor 161 upon executionof the artificial pancreas algorithm is further operable to perform oneof: change from closed loop operation modes to open loop operation mode;constrain a maximum insulin delivery according to a basal delivery ratepersonalized for a user for a set period of time after detection oruntil an event is over, wherein the event is an event different from thehypoglycemic event; deliver a set personalized basal rate for a setperiod of time after detection or until the hypoglycemic event is over;limit the rate of change as used by the processor for a set period oftime after detection or until the event is over; or the rate of changefilter is applied to limit the response by the artificial pancreasalgorithm at all times or following a hypoglycemic event.

In some scenarios, insulin delivery may not be attenuated as rapidly asdesired (e.g., at a rate suitable to recover), for example, in case ofthe occurrence of, or the impending occurrence of, a hypoglycemic event.For example, the system 100 may attenuate insulin delivery at or belowthe quantity of insulin the user may receive without the system 100 ifthe user's glucose value is below a threshold or is trending to beingreduced below a threshold. However, there may be a risk that the system100 may not attenuate insulin delivery as rapidly as desired, leadingthe processor, for example, to cause the medical device to deliverinsulin even when the user has an impending hypoglycemic risk. FIG. 11shows a flow chart of a process example for implementing an example of aresponse that increases a likelihood of suspension of insulin. In theprocess 1100, for example, a processor coupled to a glucose sensor inthe system 100 may determine insulin delivery is not attenuating at ratesuitable to recover from a hypoglycemic event or an impendinghypoglycemic event (1110). In response, the processor may apply safetyconstraints to further reduce insulin.

For example, the processor may address this slower attenuation utilizingthe foregoing techniques that modify the processor reaction via the APalgorithm and the described safety constraints executed by theprocessor. At 1120, the processor may address such a scenario in thefollowing manner:

a. In various examples, calculations made by the artificial pancreasalgorithm may increase the likelihood of suspension of insulin byreducing the penalty of estimated outcomes where the insulin deliveryrequest is below a user-inputted basal delivery; or

b. In various examples, calculations made by the artificial pancreasalgorithm may increase the likelihood of suspension of insulin byscaling the deviations of insulin delivery below the user input basal tobe proportional to the user-inputted basal delivery.

In other examples, the system 100 may manage other scenarios in whichinsulin delivery is not being attenuated during exercise or otheractivity that may induce increased hypoglycemic risk using a number oftechniques. For example, the system 100 can attenuate insulin deliverywhen an external disturbance to the system 100 such as exercise or anactivity causes reduction in glucose concentrations and increase inhypoglycemic risk. The system 100 may automatically detect this externaldisturbance. Alternatively, the external disturbance may be announced orindicated to the system 100 by a user (e.g., through a user interface onthe medical device 102 and/or the management device 106 (not shown)).FIG. 12 is a flow chart of a process example for implementing an exampleof a response that attenuates insulin delivery. In the example process1200, a processor coupled to a glucose sensor in the system 100 maydetermine insulin delivery is not attenuating at rate suitable tomaintain glucose concentrations (1210) or mitigate a hypoglycemic eventor an impending hypoglycemic event. In response, the processor may applysafety constraints to further reduce insulin. For example, the processormay alter either a control target glucose value by increasing thecontrol target (i.e., glucose setpoint) to a glucose value higher thanthe current target (e.g., to 150 mg/dL or the like from a lower currenttarget). Alternatively, the system 100 may reduce an input basal valueto a value lower than a current input basal value (e.g., approximately25% of the user's input basal)(1220). In various examples, the system100 may be subject to an additional upper bound in insulin delivery(e.g., the system 100 may not request insulin delivery greater thanapproximately 75% of the user's input basal). As a result of theapplication of the safety constraints, attenuating insulin delivery at amore rapid rate to maintain glucose concentrations (1230).

In some examples, the system 100 may not have sufficient insulin historyrelated to the user. In response, insulin delivery history data andglucose value history data can be used by the system 100 to operateeffectively within a closed loop mode of operation. If there is no knowninsulin history when in closed loop mode, then there may be a risk thatthe user has IOB and the AP algorithm may deliver more insulin thannecessary. Techniques herein can address such a scenario where thesystem 100 may not have sufficient historical operating data.

In various examples, if the system 100 does not have sufficient glucosehistory when starting closed loop operation, the system 100 may respondin one of the following ways:

I. Prompt the user with a query of whether non-basal insulin wasdelivered in a previous duration of time. If the answer is yes, limitthe AP algorithm maximum delivery of insulin to a predetermined valuefor a set amount of time (e.g., limit delivery to 1.5 times the user'sbasal for 2 hours);

II. Request a user response to a query of whether a non-basal insulindose was delivered within a previous duration of time. If the answer isyes (i.e., an affirmative response), have the user enter in the amountof insulin delivered and optionally also the time it was taken. Usingthis information, the user's IOB can be calculated and provided to theAP algorithm to safely deliver insulin. The IOB may be used by apredictive algorithm or directly limit the amount of insulin to bedelivered while the IOB remains; or

III. Limit the maximum delivery by the AP algorithm to a predeterminedvalue (such as for example 100-120 mg/dL) for a set amount of time ifthere is not sufficient insulin history when starting into closed loopmode.

Returning to the system example of FIG. 1, the management deviceprocessor 161 of the management device 106 may upon execution of theartificial pancreas algorithm may be operable to perform additionalfunctions.

For example, the management device processor 161 may determine, uponstarting closed loop operation of the artificial pancreas algorithm,that sufficient glucose history is unavailable (i.e., the glucosehistory is insufficient) for use by the artificial pancreas algorithm.In response to the determination sufficient glucose history isunavailable, the management device processor may request the user enterinto the management device an amount of insulin delivered. The requestmay also include a request for a time when, or an estimated elapsed timesince, the insulin was delivered. In response to receiving an amount ofinsulin delivered, a user's insulin on board may be calculated based onthe amount of insulin delivered. Optionally, if the time when theinsulin was delivered or the estimated elapsed time since the insulinwas delivered is provided, these respective time or elapsed time may beincluded in the calculation. For example, the management deviceprocessor may be operable to determine elapsed time if only the timewhen the insulin was delivered is provided. The management deviceprocessor may use the calculated user's insulin on board to determineutilizing a user-personalized insulin decay curve when the user'scalculated insulin on board is to fall below a predetermined threshold.Alternatively, the management device processor may, in response to thedetermination sufficient glucose history is unavailable, either limitmaximum delivery of insulin to a predetermined value for a set amount oftime or request a user response to a query of whether a non-basalinsulin dose was delivered within a previous duration of time.

In some examples, the AP algorithm/system setpoint changes in responseto various inputs or events (e.g., exercise or eating a meal). Thesystem 100 can operate to maintain a user at a specific target, orsetpoint (e.g., desired glucose level). In various examples, the system100 may allow the user to set or change the setpoint of the system 100under certain scenarios or for certain instances. In various examples,the system 100 may allow the user to set or change the setpoint of thesystem 100 temporarily for a user defined amount of time, afterexpiration of which the system 100 can revert to the previous target.

In various examples, the setpoint may be defined as a profile withdifferent setpoints being set for different time segments of the day.The target blood glucose level may change automatically at each timesegment. In various examples, in the case of a setpoint change, thesystem 100 may respond abruptly to the step change and deliver too muchor too little insulin. To prevent the system 100 from responding to thestep change, the prediction by the AP algorithm can be shifted by theamount of the target change. This can prevent the prediction from beingimpacted by the step change in target.

In some examples, safety constraints implemented via the AP algorithmmay enable the AP algorithm to respond to sensor aberrations—noise andvalue step changes—such as those represented in FIG. 3. For example,techniques that enable the system 100 to effectively manage responses toaberrations of the sensor 104 or abrupt step changes that arenon-physiological. For example, non-physiological aberrations of thesensor 104 may be caused by a noisy sensor 104 or by a physicalinteraction with the sensor 104 such as putting pressure on the sensor104 or by bumping or hitting the sensor 104. The system 100 may respondto this sudden change in value from the sensor 104 and errantly delivera drug. Techniques described herein can address this undesirableresponse and enable such events to be detected by the system 100 in thefollowing ways: A) by determining a sensor value trend only, B) bydetermining a sensor value trend in one direction followed by anopposite trend—detecting a sudden change in trend, C) by determining arate of change of the sensor value, and/or D) by determining that afirst derivative or other filtering may be used. In addition, or asalternative E), in some examples, data obtained from an accelerometerwithin the sensor, such as 104, may be used in combination with thetrend. For example, pressure induced sensor issues can occur at higherrates, for example, when a person is sleeping so sleep detection via theaccelerometer data may also be used to enhance the detection of theincident. The accelerometer data may also be used to sense impact to thesensor or delivery unit to enhance the detection. For example, aprocessor may process the accelerometer data to detect the sleep or anorientation of a person when the sensor experiences a pressure inducedsensor issue.

In various examples, upon detection of any of the above listed eventsA-E, the system 100 may respond in any of the following ways: AA) The APalgorithm may change modes such as changing from closed loop operationto open loop operation; BB) Constrain the system 100 to a maximumdelivery personalized to the user (e.g., basal) for a set period of timeafter detection or until the event (i.e., one of listed events A-Eabove) is over; CC) Deliver a set personalized rate (e.g., basal rate)for a set period of time after detection or until the event is over; DD)The AP algorithm may limit the rate of change as used by the system 100for a set period of time after detection or until the event is over, orEE) A rate of change filter may be implemented to limit the response bythe AP algorithm at all times or following a hypoglycemic event.

Safety constraints as applied to the AP algorithm and executed by aprocessor in system 100 may control system responses to sensorcalibrations, particularly when the sensor is a continuous glucosemonitor. For example, under certain situations where sensor calibrationsmay be required, there may be a resulting step change in a sensor value.In response, the system 100 may deliver a drug in response to such astep change. For example, the current state of the system 100 upon whicha prediction can be based can depend on the input sensor values at eachcontrol step. These sensor values can be dependent on user-inputreference calibration values (e.g., finger-sticks), and may changesignificantly if there is a significant discrepancy between the sensorreadings and the finger-stick values used for calibration.

These rapid changes in sensor values can introduce an artificialstep-change in the glucose trajectory (e.g., a calibration jump as shownin FIG. 3) that is not a true reflection of the actual trends in theglucose concentrations. Further, the existence of a significantdiscrepancy between finger-stick blood glucose (BG) values and CGMvalues at the time of calibration means that CGM values that were inputto the system 100 prior to the calibration reference input, as well asthe state estimation due to those CGM values, are less reliable and maynot reflect the current state. Therefore, when these events aredetected, the AP algorithm's prediction “trajectory” is reset to a flatvalue that matches the current, new CGM value. FIG. 3 illustrates anexample of adjusting a prediction trajectory based on a new CGM value.

In various examples, this reinitialization may be implemented forpositive and negative step changes. In various examples, thisreinitialization may be limited to positive step change in the bloodglucose values due to calibration only, as a negative step change inblood glucose values may induce a reduction or suspension in insulindelivery for a few cycles which may be acceptable.

For example, in system 100 of FIG. 1, a processor, such as 121, 141 or161, may be operable to execute a process by which the processorreceives one or more glucose measurement values from the glucosemonitor, such as sensor 104. The processor may also receive a user-inputreference calibration value. Using the one or more glucose values andthe user-input reference calibration value, the processor may identify adiscrepancy between the one or more glucose values from the glucosemonitor and the user-input reference calibration value. Based on theidentified discrepancy, the processor may modify the adjusted insulinbasal delivery rate.

In some examples, prior to modifying the adjusted insulin basal deliveryrate based on the identified discrepancy, the processor may calibratethe glucose monitor based on the identified discrepancy. The processormay further determine the identified discrepancy is a positive stepchange in an amount of insulin being delivered. A positive step changemay be, for example, an increase in a delivered amount of insulin. Inresponse to the identified discrepancy being a positive step change, theprocessor may obtain a current, new blood glucose measurement value fromthe calibrated glucose monitor. After obtaining the current new bloodglucose measurement value, the processor may use the current, new bloodglucose value to modify the adjusted insulin basal delivery rate basedon the identified discrepancy. Alternatively, the identified discrepancymay be determined to be a negative step change, which is a decrease in adelivered amount of insulin. In response to the identified discrepancybeing a negative step change, the processor may provide an instructionto suspend delivery of insulin for a predetermined amount of time priorto modifying the adjusted insulin basal delivery rate based on theidentified discrepancy.

The techniques described herein for providing safety constraints for adrug delivery system (e.g., the system 100 or any component thereof) canbe implemented in hardware, software, or any combination thereof. Forexample, the system 100 or any component thereof can be implemented inhardware, software, or any combination thereof. Software relatedimplementations of the techniques described herein can include, but arenot limited to, firmware, application specific software, or any othertype of computer readable instructions that can be executed by one ormore processors. Hardware related implementations of the techniquesdescribed herein can include, but are not limited to, integratedcircuits (ICs), application specific ICs (ASICs), field programmablearrays (FPGAs), and/or programmable logic devices (PLDs). In someembodiments, the techniques described herein, and/or any system orconstituent component described herein can be implemented with aprocessor executing computer readable instructions stored on one or morememory components.

Some embodiments of the disclosed device may be implemented, forexample, using a storage medium, a computer-readable medium or anarticle of manufacture which may store an instruction or a set ofinstructions that, if executed by a machine (i.e., processor ormicrocontroller), may cause the machine to perform a method and/oroperation in accordance with embodiments of the disclosure. Such amachine may include, for example, any suitable processing platform,computing platform, computing device, processing device, computingsystem, processing system, computer, processor, or the like, and may beimplemented using any suitable combination of hardware and/or software.The computer-readable medium or article may include, for example, anysuitable type of memory unit, memory device, memory article, memorymedium, storage device, storage article, storage medium and/or storageunit, for example, memory (including non-transitory memory), removableor non-removable media, erasable or non-erasable media, writeable orre-writeable media, digital or analog media, hard disk, floppy disk,Compact Disk Read Only Memory (CD-ROM), Compact Disk Recordable (CD-R),Compact Disk Rewriteable (CD-RW), optical disk, magnetic media,magneto-optical media, removable memory cards or disks, various types ofDigital Versatile Disk (DVD), a tape, a cassette, or the like. Theinstructions may include any suitable type of code, such as source code,compiled code, interpreted code, executable code, static code, dynamiccode, encrypted code, programming code, and the like, implemented usingany suitable high-level, low-level, object-oriented, visual, compiledand/or interpreted programming language. The non-transitory computerreadable medium embodied programming code may cause a processor whenexecuting the programming code to perform functions, such as thosedescribed herein.

Certain examples, or embodiments, of the present disclosure weredescribed above. It is, however, expressly noted that the presentdisclosure is not limited to those embodiments, but rather the intentionis that additions and modifications to what was expressly describedherein are also included within the scope of the disclosed examples.Moreover, it is to be understood that the features of the variousexamples described herein were not mutually exclusive and can exist invarious combinations and permutations, even if such combinations orpermutations were not made express herein, without departing from thespirit and scope of the disclosed examples. In fact, variations,modifications, and other implementations of what was described hereinwill occur to those of ordinary skill in the art without departing fromthe spirit and the scope of the disclosed examples. As such, thedisclosed examples are not to be defined only by the precedingillustrative description.

What is claimed is:
 1. A non-transitory computer readable mediumembodied with programming code executable by a processor, and theprocessor when executing the programming code is operable to performfunctions, including functions to: receive, at regular time intervals, avalue of a glucose measurement made by a glucose monitor; predict futureglucose values based on prior glucose measurement values; adjust aninsulin basal delivery rate to be provided by a medical device based onthe predicted future glucose values; and deliver insulin via the medicaldevice according to the adjusted insulin basal delivery rate.
 2. Thenon-transitory computer readable medium of claim 1, wherein theprogramming code when executed by the processor, the processor performsfurther functions to: receive a subsequent glucose measurement value viathe wireless connection with the glucose monitor; determine a totaldaily insulin-based basal glucose level using the received subsequentglucose measurement value and the prior glucose values from a past timeperiod; compare the total daily insulin-based basal glucose level to auser-set basal glucose setpoint; and in response to a result of thecomparison indicating the user-set basal glucose setpoint is erroneous,determine an updated insulin basal delivery rate to be delivered by themedical device, wherein the updated insulin basal delivery rate isupdated from the adjusted insulin basal delivery rate.
 3. Thenon-transitory computer readable medium of claim 1, wherein theprogramming code when executed by the processor, the processor performsfurther functions to: receive one or more glucose measurement valuesfrom the glucose monitor; receive a user-input reference calibrationvalue; identify a discrepancy between the one or more glucosemeasurement values from the glucose monitor and the user-input referencecalibration value; and modify the adjusted insulin basal delivery ratebased on the identified discrepancy.
 4. The non-transitory computerreadable medium of claim 3, wherein the programming code when executedby the processor, the processor prior to modifying the adjusted insulinbasal delivery rate based on the identified discrepancy, performsfurther functions to: calibrate the glucose monitor based on theidentified discrepancy; determine the identified discrepancy is apositive step change in an amount of insulin being delivered, whereinthe positive step change is an increase in a delivered amount ofinsulin; in response to the identified discrepancy being a positive stepchange, obtain a current, new blood glucose measurement value from thecalibrated glucose monitor; and use the current, new blood glucosemeasurement value to modify the adjusted insulin basal delivery ratebased on the identified discrepancy.
 5. The non-transitory computerreadable medium of claim 3, wherein the programming code when executedby the processor, the processor prior to modifying the adjusted insulinbasal delivery rate based on the identified discrepancy, performsfurther functions to: calibrate the glucose monitor based on theidentified discrepancy; determining the identified discrepancy is anegative step change, wherein the negative step change is a decrease ina delivered amount of insulin; and in response to the identifieddiscrepancy being a negative step change, provide an instruction tosuspend delivery of insulin for a predetermined amount of time.
 6. Thenon-transitory computer readable medium of claim 1, wherein theprogramming code when executed by the processor, the processor performsfurther functions to: determine, based on a measurement provided by theglucose monitor, a hypoglycemic event has occurred; and modify theadjusted insulin basal delivery rate in response to the determinationthat a hypoglycemic event has occurred.
 7. The non-transitory computerreadable medium of claim 6, wherein the programming code when executedby the processor, the processor, when modifying the adjusted insulinbasal delivery rate in response to the determination that a hypoglycemicevent has occurred, performs further functions to: set a reducedtemporary basal delivery rate of the medical device that is used indosing calculations for a predetermined period of time following thedetermination of the occurrence of the hypoglycemic event.
 8. Thenon-transitory computer readable medium of claim 6, wherein theprogramming code when executed by the processor, the processor, whenmodifying the adjusted insulin basal delivery rate in response to thedetermination that a hypoglycemic event has occurred, performs furtherfunctions to: set a reduced temporary basal delivery rate of the medicaldevice that is used in dosing calculations until a rate of change ofblood glucose levels decreases below a predetermined threshold followingthe determination of the occurrence of the hypoglycemic event.
 9. Thenon-transitory computer readable medium of claim 6, wherein theprogramming code when executed by the processor, the processor, whenmodifying the adjusted insulin basal delivery rate in response to thedetermination that a hypoglycemic event has occurred, performs furtherfunctions to: set a reduced temporary basal delivery rate of the medicaldevice that is used in dosing calculations until a blood glucose levelis above a predetermined threshold following the determination of theoccurrence of the hypoglycemic event.
 10. A method performed by aprocessor coupled to a glucose monitor and a medical device via wirelessconnections, the method comprising: receiving, by the processor from theglucose monitor, a number of glucose measurement values, wherein eachglucose measurement value of the number of glucose measurement values isreceived at a regular time interval over a period of time and theregular time interval is less than the period of time; predicting anumber of future glucose measurement values using at least one of thenumber of glucose measurement values; determining that a subsequentglucose measurement value has not been received within a next regulartime interval; in response to the determination that the subsequentglucose measurement value has not arrived, adjusting a total dailyinsulin-based basal delivery rate to be provided by a medical devicebased on at least one of the predicted number of future glucosemeasurement values; and delivering insulin via the medical deviceaccording to the adjusted total daily insulin-based basal delivery rate,wherein the insulin is delivered via the medical device according to theadjusted total daily insulin-based basal delivery rate for a trustedprediction period of time.
 11. The method of claim 10, furthercomprising: in response to a last-received glucose measurement valuebeing within a particular range of previous glucose measurement valuesand the trusted prediction period of time spanned a duration of timecorresponding to a predetermined number of regular time intervals,determining delivery of insulin is to be suspended; based on a value ofthe last-received glucose measurement value falling within a particularrange of a plurality of ranges of glucose measurement values, selectinga time period for suspending the delivery of insulin from a plurality ofpre-set time periods; and suspending deliver of insulin for the selectedtime period.
 12. The method of claim 10, further comprising:determining, by the processor, that the medical device has deliveredmore than a preset volume of insulin over a set amount of time, whereinthe preset volume of insulin is based on one or more of: a user inputbasal rate, a rate calculated by an artificial pancreas algorithm usingan average daily delivery rate, a rate based on user weight and/or userage, a total daily insulin delivered, or a total daily basal delivered;and in response to the determination, adjusting an amount of insulin tobe delivered by the medical device as an adjusted basal dosage based ona calculation using a volume of insulin delivered over the set amount oftime and a total daily insulin to be delivered as calculated by anartificial pancreas algorithm.
 13. The method of claim 12, furthercomprising: limiting the amount of insulin to be delivered as theadjusted basal dosage to a maximum volume of a user's basal insulindelivery volume divided by either a time increment at which the adjustedbasal dosage is administered or a percentage of an hourly basal rate,wherein the time increment is less than an hour.
 14. A system,comprising: a medical device comprising a pump, a reservoir configuredto contain insulin, a processor and a transceiver, wherein the medicaldevice is operable to deliver insulin in response to outputs from theprocessor; a sensor comprising a transmitter, a processor and a cannula,the sensor operable to measure blood glucose and output a blood glucosevalue; and a management device comprising a management device processor,a management device memory configured to store programming instructionsincluding an artificial pancreas algorithm, and a management devicetransceiver, wherein the management device processor is operable uponexecution of the programming instructions including the artificialpancreas algorithm to: determine an occurrence of a hypoglycemic event;in response to the determination of the occurrence of the hypoglycemicevent, implement a glucose rate of change filter for a predeterminedperiod of time, wherein the glucose rate of change filter limits a rateof change in measured blood glucose values used by the artificialpancreas algorithm in a determination of a time for delivery of insulinand a dosage of the insulin to be delivered; and instruct the medicaldevice to deliver a determined dosage of the insulin at a determinedtime for delivery.
 15. The system of claim 14, wherein the processor ofthe management device upon execution of the artificial pancreasalgorithm is further operable to: limit a duration of time forimplementation of the glucose rate of change filter by applying one ormore limitations from: a time when a measured glucose value first wentbelow a predetermined threshold related to the hypoglycemic event, atime that a measured glucose value is above another predeterminedthreshold after the occurrence of the hypoglycemic event, until theglucose rate of change decreases below a further predeterminedthreshold, or until the glucose is above an additional predeterminedthreshold.
 16. The system of claim 14, wherein the management deviceprocessor, upon execution of the artificial pancreas algorithm, appliesthe glucose rate of change filter at one of: at all times, when both apositive and a negative glucose rate of change are determined, or onlywhen a positive glucose rate of change is determined.
 17. The system ofclaim 14, wherein the processor of the management device upon executionof the artificial pancreas algorithm is further operable to: determinetimes and dosages of insulin to be delivered to a user, wherein thetimes and the dosages are calculated based on a user's sex, a user'sage, a user's weight, a user's height, and/or on glucose levels providedby the sensor.
 18. The system of claim 14, wherein the processor of themanagement device upon execution of the artificial pancreas algorithm isfurther operable to perform one of: change from closed loop operationmodes to open loop operation mode; constrain a maximum insulin deliveryaccording to a basal delivery rate personalized for a user for a setperiod of time after detection or until an event is over, wherein theevent is different from the hypoglycemic event; deliver a setpersonalized basal rate for a set period of time after detection oruntil the hypoglycemic event is over; limit the rate of change as usedby the processor for a set period of time after detection or until theevent is over; or the glucose rate of change filter is applied to limitthe response by the artificial pancreas algorithm at all times orfollowing a hypoglycemic event.
 19. The system of claim 14, wherein theprocessor of the management device upon execution of the artificialpancreas algorithm is further operable to: determine, upon startingclosed loop operation of the artificial pancreas algorithm, thatsufficient glucose history is unavailable for use by the artificialpancreas algorithm; and in response to the determination that sufficientglucose history is unavailable, either: limit maximum delivery ofinsulin to a predetermined value for a set amount of time; or request auser response to a query of whether a non-basal insulin dose wasdelivered within a previous duration of time.
 20. The system of claim14, wherein the processor of the management device upon execution of theartificial pancreas algorithm is further operable to: determine, uponstarting closed loop operation of the artificial pancreas algorithm,that sufficient glucose history is unavailable for use by the artificialpancreas algorithm; in response to the determination that sufficientglucose history is unavailable, request a user enter provide themanagement device with an amount of insulin delivered by a medicaldevice; in response to receiving an amount of insulin delivered inresponse to the request, calculate a user's insulin on board based onthe amount of insulin delivered; and use the calculated user's insulinon board to determine utilizing a user-personalized insulin decay curvewhen the user's calculated insulin on board is to fall below apredetermined threshold.